import request from '@/utils/request'

export function postProblemPhotoCreate(
  projectName,
  projectType,
  detail,
  imageUrl,
  area,
  address
) {
  return request('/ProblemPhoto/Create', {
    method: 'POST',
    data: {
      projectName,
      projectType,
      detail,
      imageUrl,
      area,
      address
    }
  })
}
export function FileUpload(formFiles) {
  const params = new FormData()
  params.append('formFiles', formFiles)
  console.log(params)
  return request('/File/Upload', {
    method: 'POST',
    data: params
  })
}
export function UserLogin(name, password) {
  return request('/User/Login', {
    method: 'GET',
    params: { name, password }
  })
}
export function ProblemPhotoGetList(pageIndex, pageSize, searchKey) {
  return request('/ProblemPhoto/GetList', {
    method: 'GET',
    params: { pageIndex, pageSize, searchKey }
  })
}
